#ifndef _EQTEST_GL_TRIANGLE_MESH_H
#define _EQTEST_GL_TRIANGLE_MESH_H

#include <eq/gl.h>

#include "glew_context_holder.h"

namespace eqtest
{
    namespace obj_loader
    {
        class ObjectFile;
    }
    
    class GLTriangleMesh : private GLEWContextHolder
    {
        public:
            GLTriangleMesh(obj_loader::ObjectFile const& objFile, GLEWContext const* context);
            ~GLTriangleMesh();
            
            void draw(double begin = 0.0, double end = 1.0) const;
            
        private:
            GLuint vertexBuffer, vertexArray;
            int vertexCount;
    };
}

#endif
